<?php
require_once ('password.php');
function GetConnection(){
	global $password;	
	$conn = new mysqli('localhost', 'n02323107', $password, 'n02323107_db');
	if($conn->error){
		throw new Exception($conn->error, 1);
	}
	return $conn;
}

function EscapeRow($row, $conn){
	$arr = array();
	foreach($row as $key => $value){
		$arr[$key] = $conn->real_escape_string($value);
	}
	return $arr;
}